package com.xk857.simpleeffect.domain.entity;

import androidx.annotation.NonNull;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;


public class Matter implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    private String title;

    private String icon;

    private String remark;

    /**
     * 预计完成日期
     */
    private String dateTxt;


    private List<Integer> createTime;

    private Long cid;

    private Long businessId;

    private Integer projectId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getDateTxt() {
        return dateTxt;
    }

    public void setDateTxt(String dateTxt) {
        this.dateTxt = dateTxt;
    }

    public LocalDateTime getCreateTime() {
        if (createTime.size() == 5) {
            return LocalDateTime.of(createTime.get(0), createTime.get(1), createTime.get(2), createTime.get(3), createTime.get(4), 0);
        }
        return LocalDateTime.of(createTime.get(0), createTime.get(1), createTime.get(2), createTime.get(3), createTime.get(4), createTime.get(5));
    }

    public void setCreateTime(List<Integer> createTime) {
        this.createTime = createTime;
    }

    public Long getCid() {
        return cid;
    }

    public void setCid(Long cid) {
        this.cid = cid;
    }

    public Long getBusinessId() {
        return businessId;
    }

    public void setBusinessId(Long businessId) {
        this.businessId = businessId;
    }

    public Integer getProjectId() {
        return projectId;
    }

    public void setProjectId(Integer projectId) {
        this.projectId = projectId;
    }

    @NonNull
    @Override
    public String toString() {
        return "Matter{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", icon='" + icon + '\'' +
                ", remark='" + remark + '\'' +
                ", dateTxt='" + dateTxt + '\'' +
                ", createTime=" + this.getCreateTime() +
                ", cid=" + cid +
                ", businessId=" + businessId +
                ", projectId=" + projectId +
                '}';
    }
}